package com.slg.android.manyanime.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.slg.android.manyanime.R;

public class AnimationDetailIntroFragment extends Fragment {
    @ViewInject(R.id.animation_detail_fragment_intro)
    private TextView intro;
    private String content;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle arguments = getArguments();
        content = arguments.getString("intro");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_animation_detail_intro, container, false);
        ViewUtils.inject(this,view);
        if(TextUtils.isEmpty(content)){
            intro.setText("尚无简介");
        }else{
            intro.setText(content);
        }
        return view;
    }


}
